MPT.addAction("profile_eidtAvatar", function(_elm) {

    var edit_avatar_jQ = $('#edit_avatar', _elm);
    var cur_head_jQ = $('.e_cur_head', _elm);

    var uid = MPT.Config["session"]['userid'];
    var avatarPath = Util.avatarPath(uid);


    Tab.switchProfile();

    var edit_avatar_plugin = $(MPT.getTmpl('edit_avatar'));
    new EditAvatar(edit_avatar_plugin.get());
    edit_avatar_jQ.replaceWith(edit_avatar_plugin);

    cur_head_jQ.attr("src", avatarPath);

});